Optimal. Leaf size=58 \[ \frac {i a^2 (c-i c \tan (e+f x))^4}{2 f}-\frac {i a^2 (c-i c \tan (e+f x))^5}{5 c f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45}
\begin {gather*} \frac {i a^2 (c-i c \tan (e+f x))^4}{2 f}-\frac {i a^2 (c-i c \tan (e+f x))^5}{5 c f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4 \, dx &=\left (a^2 c^2\right ) \int \sec ^4(e+f x) (c-i c \tan (e+f x))^2 \, dx\\ &=\frac {\left (i a^2\right ) \text {Subst}\left (\int (c-x) (c+x)^3 \, dx,x,-i c \tan (e+f x)\right )}{c f}\\ &=\frac {\left (i a^2\right ) \text {Subst}\left (\int \left (2 c (c+x)^3-(c+x)^4\right ) \, dx,x,-i c \tan (e+f x)\right )}{c f}\\ &=\frac {i a^2 (c-i c \tan (e+f x))^4}{2 f}-\frac {i a^2 (c-i c \tan (e+f x))^5}{5 c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.95, size = 80, normalized size = 1.38 \begin {gather*} \frac {a^2 c^4 \sec (e) \sec ^5(e+f x) (-5 i \cos (f x)-5 i \cos (2 e+f x)+5 \sin (f x)-5 \sin (2 e+f x)+5 \sin (2 e+3 f x)+\sin (4 e+5 f x))}{20 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 50, normalized size = 0.86
method | result | size |
risch | \(\frac {8 i a^{2} c^{4} \left (5 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{5 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) | \(39\) |
derivativedivides | \(\frac {a^{2} c^{4} \left (\tan \left (f x +e \right )-\frac {\left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {i \left (\tan ^{4}\left (f x +e \right )\right )}{2}-i \left (\tan ^{2}\left (f x +e \right )\right )\right )}{f}\) | \(50\) |
default | \(\frac {a^{2} c^{4} \left (\tan \left (f x +e \right )-\frac {\left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {i \left (\tan ^{4}\left (f x +e \right )\right )}{2}-i \left (\tan ^{2}\left (f x +e \right )\right )\right )}{f}\) | \(50\) |
norman | \(\frac {a^{2} c^{4} \tan \left (f x +e \right )}{f}-\frac {a^{2} c^{4} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}-\frac {i a^{2} c^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{f}-\frac {i a^{2} c^{4} \left (\tan ^{4}\left (f x +e \right )\right )}{2 f}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 72, normalized size = 1.24 \begin {gather*} -\frac {2 \, a^{2} c^{4} \tan \left (f x + e\right )^{5} + 5 i \, a^{2} c^{4} \tan \left (f x + e\right )^{4} + 10 i \, a^{2} c^{4} \tan \left (f x + e\right )^{2} - 10 \, a^{2} c^{4} \tan \left (f x + e\right )}{10 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 97 vs. \(2 (48) = 96\).
time = 1.12, size = 97, normalized size = 1.67 \begin {gather*} -\frac {8 \, {\left (-5 i \, a^{2} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{2} c^{4}\right )}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 131 vs. \(2 (44) = 88\).
time = 0.30, size = 131, normalized size = 2.26 \begin {gather*} \frac {40 i a^{2} c^{4} e^{2 i e} e^{2 i f x} + 8 i a^{2} c^{4}}{5 f e^{10 i e} e^{10 i f x} + 25 f e^{8 i e} e^{8 i f x} + 50 f e^{6 i e} e^{6 i f x} + 50 f e^{4 i e} e^{4 i f x} + 25 f e^{2 i e} e^{2 i f x} + 5 f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 97 vs. \(2 (48) = 96\).
time = 0.73, size = 97, normalized size = 1.67 \begin {gather*} -\frac {8 \, {\left (-5 i \, a^{2} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{2} c^{4}\right )}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.60, size = 80, normalized size = 1.38 \begin {gather*} -\frac {a^2\,c^4\,\sin \left (e+f\,x\right )\,\left (-10\,{\cos \left (e+f\,x\right )}^4+{\cos \left (e+f\,x\right )}^3\,\sin \left (e+f\,x\right )\,10{}\mathrm {i}+\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^3\,5{}\mathrm {i}+2\,{\sin \left (e+f\,x\right )}^4\right )}{10\,f\,{\cos \left (e+f\,x\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________